package cn.com.jenson.entity.user;


import cn.com.jenson.common.BasicEntity;
import cn.com.jenson.convert.StringListConcert;
import com.fasterxml.jackson.annotation.JsonBackReference;
import lombok.*;

import javax.persistence.*;
import java.util.List;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@Entity
@ToString
public class Role extends BasicEntity {
    private String name;
    private Boolean isAdmin = false;
    @Convert(converter = StringListConcert.class)
    private List<String> authList;

    public Role(String name, Boolean isAdmin) {
        this.name = name;
        this.isAdmin = isAdmin;
    }
}
